def passCheck():
    username = input('Please input your name:')
    #password = input('Please input your password:')
    a = open('/root/python3/passwd','r',encoding='utf-8')
    b = a.readlines()
    for item in b:
        count = 0
        while (count < 3):
            password = input('Please input your password:')
            if password == item.strip():
                print('Right,Welcome')
                break
            else:
                print('Please input again')
                count +=1
    a.close()
passCheck()